<template>
  <div>
        <div class="wwei">
              <div class="go" v-for="(item,index) in alltext" :key="index" @click="intext(index)">
                    <img :src="item.doorHeadUrl" alt="">
                    <div>
                        <p>{{item.storeName}}</p>
                        <span class="andd">门店状态：</span>  <span class="not">未通过</span>
                        <div>
                            <span class="out">原因：</span> <span class="out-er"> 门店信息地址与实际不符合</span>
                        </div>
                    </div>
              </div>
              
        </div>
        <div class="bottom-red" @click="tothenewstore()">  <p>+</p> <span>新增门店</span> </div>
  </div>
</template>

<script>
export default {
   data(){
return {
    alltext:""
}
     
   },
   methods:{
       intext(index){
        //    console.log(this.alltext[index].id)
        this.$router.push({name:'thejumpinnew'})
             this.$store.commit('alltext',this.alltext[index].id)
             console.log("vuex",this.$store.state.alltextwen)
       },
       tothenewstore(){
           this.$router.push({path:"thenewstore"})
       },
          nanmeall(){
           {
      this.$http
        .post(
          "https://web-gateway.newbeescm.com/b2b-app-web/app/shop/listByUserId?userId=2177665",{},
          {
            headers: {
              token: this.$store.state.token,
              userId: this.$store.state.userInfo.id
            }
          }
        )
        .then(res => {
            this.alltext = res.data.result
          console.log("门店资料",res.data.result)
        })
        .catch(err => {
          console.log(err);
        })
    }
      }
   },
   mounted(){
   this.nanmeall()
   }
}

</script>
<style lang="scss" scoped>
.bottom-red{
    background: #DD3333;
    height: 0.42rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.16rem;
    color: #FFFFFF;
    position: sticky;
    bottom: 0;
    width: 100%;
    p{
        font-size: 0.32rem;
        margin-right: 0.08rem;
    }
}
.go{
    display: flex;
    align-items: center;
    img{
        width: 0.8rem;
        height: 0.8rem;
        margin: 0.14rem 0.13rem;
    }
    div{
        p{
            margin-bottom: 0.13rem;
            font-size: 0.14rem;
            color: #333333;
        }
        .andd{
            font-size: 0.12rem;
            color: #999999;
        }
        .not{
            font-size: 0.12rem;
            color: #DD3333;
        }
        div{
            margin-top:0.09rem;
            font-size: 0.12rem;
            .out{
                color: #999999;
            }
            .out-er{
                color: #000000;
            }
        }
    }

}
</style>
